<div class="products index">
<h2>商品一覧</h2>
<p>
<?php
echo $paginator->counter(array(
'format' => __('Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%', true)
));
?></p>
<table cellpadding="5" cellspacing="0">
<?php
$i = 0;
foreach ($products as $product):
        $class = 'ListLine0';
        if ($i++ % 2 == 0) {
                $class = 'ListLine1';
        }
?>
        <tr valign="top" class="<?php echo $class ?>" >
                <td>
                        <img width="60" height="70" src="<?php echo $product['Product']['image_url']; ?>" />
                </td>
                <td width="60%" align="left">
                        <span class="ListTitle"><?php echo $product['Product']['title']; ?></span><br/>
                        <?php __($text->truncate($product['Product']['description'],80)); ?>
                </td>
                <td style="text-align:right">
                        <?php echo $time->format('y-n-j',$product['Product']['date_available']); ?><br />
                        <strong><?php echo $number->format($product['Product']['price'],
                                                                array('places' => 2,'before' => '¥ ','escape' => false, 'decimals' => '.',
                                                                        'thousands' => ',' )); ?></strong>
                </td>
                <td class="ListActionss">
                        <?php echo $html->link(__('表示', true), array('action' => 'view', $product['Product']['id'])); ?><br/>
                        <?php echo $html->link(__('編集', true), array('action' => 'edit', $product['Product']['id'])); ?><br/>
                        <?php echo $html->link(__('破棄', true), array('action' => 'delete', $product['Product']['id']), null,
                                sprintf(__('本当に破棄しますか? # %s', true), $product['Product']['id'])); ?>
                </td>
        </tr>
<?php endforeach; ?>
</table>
</div>
<div class="paging">
        <?php echo $paginator->prev('<< '.__('前のページ', true), array(), null, array('class'=>'disabled'));?>
 |      <?php echo $paginator->numbers();?>
        <?php echo $paginator->next(__('次のページ', true).' >>', array(), null, array('class' => 'disabled'));?>
</div>
<div class="actions">
        <ul>
                <li><?php echo $html->link(__('新しい商品', true), array('action' => 'add')); ?></li>
        </ul>
</div>
